﻿using System;
using System.Data.Common;

namespace UPos.Core.Entity
{
    public class ReceiveEntries
    {
        public string FParentID { get; set; }

        public decimal PayMoney { get; set; }

        public string PaymentCode { get; set; }

        public ReceiveEntries() { }

        public ReceiveEntries(DbDataReader reader, Func<DbDataReader, string> codeFormat)
        {
            FParentID = reader.GetString(reader.GetOrdinal("FParentID"));
            PayMoney = reader.GetDecimal(reader.GetOrdinal("PayMoney"));
            PaymentCode = codeFormat(reader);
        }
    }
}
